package gti310.tp2;

import java.io.FileNotFoundException;

import gti310.tp2.io.*;
import gti310.tp2.audio.*;

public class Application {

	/**
	 * Launch the application
	 * @param args This parameter is ignored
	 * @throws Exception 
	 */
	public static void main(String args[]) throws Exception {
		System.out.println("Audio Resample project!");
		FileSource in = null;
		FileSink out = null;
		try {
			in = new FileSource(args[0]) ;
			out = new FileSink(args[1]);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		//Create the filter
		if(in != null && out != null){
			ConcreteAudioFilter filter = new ConcreteAudioFilter(in, out);
			filter.process();
		}
	}
}
